<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js">
    </script>
</head>
<body>
<a><button id="submit">查询签到人员</button></a>
</body>
<script >

    //登录后显示用户名和状态
    $(function () {
        //创建websocket对象
        var host = "192.168.6.234:8888";
        var token = "48d3535b9ca84ss4029a583ea891fc58ea"
        var meetId = "1514190753357205506"
        var ws = new WebSocket("ws://" + host + "/meet/attend/query/signList/" + token + "/" + meetId);

        // 客户端和服务端建立连接后触发
        ws.onopen = function () {
            console.log("已连接")
        };

        // 接收到服务端发送过来的消息后触发
        ws.onmessage = function (evt) {
            //获取数据
            var dataStr = evt.data;
            var jsonData = JSON.parse(dataStr);
            console.log(jsonData)
        };

        // 关闭连接触发
        ws.onclose = function () {
            console.log("关闭")
        };

        // 点击发送按钮触发，然后向服务端发送消息
        $("#submit").click(function () {
            var meetAttendQuerySignDTO =
            {
                "keywords": "",
                "otherId": "1514190753357205506",
                "isFiltrateUnSign": true,
                "isSortBySignState": true
            }
            ws.send(JSON.stringify(meetAttendQuerySignDTO));
        });

    });

</script>
</html>
